/* 
 * File:   FileMock.h
 * Author: alexey
 *
 * Created on 30 Март 2011 г., 15:17
 */

#ifndef FILEMOCK_H
#define	FILEMOCK_H

#include <gmock/gmock.h>
#include <IFile.h>
#include "../md5/md5.h"

namespace mock
{
    class FileObjectMock : public storagemon::IFile
    {
    public:
        virtual ~FileObjectMock() {};
        MOCK_CONST_METHOD0(id, u_long ());
        MOCK_CONST_METHOD0(parent_id, u_long ());
        MOCK_CONST_METHOD0(name, const char* ());
        MOCK_CONST_METHOD0(path, const char* ());
        MOCK_CONST_METHOD0(full_path, const char* ());
        MOCK_METHOD1(md5_string, char* (char* md5));
        MOCK_METHOD0(md5, char* ());
    };

    inline storagemon::IService* CreateStorageServiceFileMock(const char* name,
            const char* path, u_long id, u_long parent_id,
            char md5[MD5_DIGEST_SIZE])
    {
        return new FileObjectMock();
    }
}

#endif	/* FILEMOCK_H */

